<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRentAndPurchaseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rent_and_purchase', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('uid')->comment('用户id');
            $table->string('house_name')->nullable();
            $table->tinyInteger('house_type')->comment('房间类型');
            $table->string('house_region')->default('')->comment('区域');
            $table->decimal('house_product')->comment('预算');
            $table->string('house_budget')->default('')->comment('面积');
            $table->string('house_rent_and_purchase')->default('')->comment('租房或购房');
            $table->string('house_title')->default('')->comment('标题');
            $table->string('house_text')->default('')->comment('描述');
            $table->dateTime('house_end_time')->comment('结束时间');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('rent_and_purchase');
    }
}
